import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
   redirect:"/home"
  },
  {
    path: '/about',
    name: 'About',
    
    component: () => import( '../views/About.vue')
  },
  {
    path: '/home',
    name: 'home',
    
    component: () => import( '../views/home/index.vue')
  },
  {
    path: '/home/city',
    name: 'city',
    
    component: () => import( '../views/home/city/index.vue')
  },
  {
    path: '/home/search',
    name: 'search',
    
    component: () => import( '../views/home/search/index.vue')
  },
  {
    path: '/home/TheHome',
    name: 'TheHome',
    
    component: () => import( '../views/home/TheHome/index.vue')
  },
  {
    path: '/home/brand',
    name: 'brand',
    
    component: () => import( '../views/home/brand/index.vue')
  },
  {
    path: '/project',
    name: 'project',
    
    component: () => import( '../views/project/index.vue')
  },
  {
    path: '/cation',
    name: 'cation',
    
    component: () => import( '../views/cation/index.vue')
  },
  {
    path: '/cation/cationSon',
    name: 'cationSon',
    
    component: () => import( '../views/cation/cationSon/index.vue')
  },
  {
    path: '/cation/cationSon/cationSonInfo',
    name: 'cationSonInfo',
    
    component: () => import( '../views/cation/cationSonInfo/index.vue')
  },
  {
    path: '/cart',
    name: 'cart',
    
    component: () => import( '../views/cart/index.vue')
  },
  {
    path: '/my',
    name: 'my',
    
    component: () => import( '../views/my/index.vue')
  }
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
